Home:ALL Converter>Number mask in SweetAlert2

Number mask in SweetAlert2

Ask Time:2018-11-19T23:02:59         Author:Arthur Gabriel Silva Arantes

Json Formatter

I would like to put a number mask in an input of sweetalert2, can you help me? my code:

onClick(btn) {
    let code2_fa = '';
    if (JSON.parse(localStorage.getItem('user')).password.two_factors.is_active) {
      swal({
        title: 'Digite o TOKEN para prosseguir',
        imageUrl: './assets/imgs/Authy.svg',
        imageAlt: 'Logo Authy',
        input: 'text',
        inputPlaceholder: 'Digite o TOKEN...',
        inputAttributes: {
          maxlength: '6',
          autofocus: 'true',
          required: 'true',
        },
        inputValue: code2_fa,
        animation: true,
        allowEnterKey: true,
        inputAutoTrim: true,

      })
  }

Author:Arthur Gabriel Silva Arantes,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53377374/number-mask-in-sweetalert2
yy